package nc.vo.gsp.pub.check.context;


import nc.vo.gsp.pub.check.CheckTools;
import nc.vo.pub.lang.UFDate;
import nc.vo.pub.lang.UFDateTime;
import nc.vo.pub.lang.UFDouble;


public abstract class GspCheckContext {

	public GspCheckContext() {
		super();
	}
	
	public abstract Object getHeadValue(String key);
	
	public abstract Object getBodyValueAt(int row,String key);
	
	public abstract int getRowState(int row);
	
	public abstract int getBodyRowCount();
	
	public abstract void showErr(String errMsg);
	
	public UFDouble getHeadUFDoubleValue(String key){
		return CheckTools.toUFDouble(getHeadValue(key));
	}
	
	public UFDate getHeadUFDateValue(String key){
		return CheckTools.toUFDate(getHeadValue(key));
	}
	
	public Integer getHeadIntegerValue(String key){
		return CheckTools.toInteger(getHeadValue(key));
	}
	
	public UFDateTime getHeadUFDateTimeValue(String key){
		return CheckTools.toUFDateTime(getHeadValue(key));
	}
	
	
	public UFDouble getBodyUFDoubleValueAt(int row,String key){
		return CheckTools.toUFDouble(getBodyValueAt(row,key));
	}
	
	public UFDate getBodyUFDateValueAt(int row,String key){
		return CheckTools.toUFDate(getBodyValueAt(row,key));
	}
	
	public Integer getBodyIntegerValueAt(int row,String key){
		return CheckTools.toInteger(getBodyValueAt(row,key));
	}
	
	public UFDateTime getBodyUFDateTimeValueAt(int row,String key){
		return CheckTools.toUFDateTime(getBodyValueAt(row,key));
	}


}

